From aaea89803b20e38e0441b05d751febcb54ed0621 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 1 Dec 2009 13:46:31 +0000 Subject: [PATCH] libxenlight: set domain handle Set domain handle much like xend does, identical to the uuid. This allows obtaining the uuid of a domain from the handle in the dominfo struct. Signed-off-by: Andres Lagar-Cavilla --- tools/libxl/libxl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 002abf1a95..3746967c30 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -101,7 +101,7 @@ int libxl_domain_make(struct libxl_ctx *ctx, libxl_domain_create_info *info, flags |= info->hap ? XEN_DOMCTL_CDF_hap : 0; *domid = 0; - /* XXX handle has to be initialised here. + /* * info->uuid != xen_domain_handle_t * See: * http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt @@ -118,6 +118,8 @@ int libxl_domain_make(struct libxl_ctx *ctx, libxl_domain_create_info *info, * uint8_t node[_UUID_NODE_LEN]; * }; */ + /* Ultimately, handle is an array of 16 uint8_t, same as uuid */ + memcpy(handle, info->uuid, sizeof(xen_domain_handle_t)); ret = xc_domain_create(ctx->xch, info->ssidref, handle, flags, domid); if (ret < 0) { -- 2.30.2